package com.baseframe.sys.controller;

import org.apache.shiro.SecurityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.baseframe.sys.entity.FrameUser;

/**
 * Controller公共组件
 * 
 */
public abstract class AbstractController {
	protected Logger logger = LoggerFactory.getLogger(getClass());
	
	protected FrameUser getUser() {
		Object obj=SecurityUtils.getSubject().getPrincipal();
		return (FrameUser) obj;
	}

	protected String getUserguid() {
		return getUser().getUserguid();
	}

	protected String getOuguid() {
		return getUser().getOuguid();
	}
}
